package com.tanhua.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.domain.db.UserFreeze;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface UserFreezeMapper extends BaseMapper<UserFreeze> {
    @Insert("insert into tb_user_freeze values(null,#{userId},#{freezingTime},#{freezingRange},#{reasonsForFreezing},#{frozenRemarks})")
    Integer save(UserFreeze userFreeze);

    @Delete("DELETE FROM tb_user_freeze WHERE user_id=#{userId}")
    void delectUnfreeze(Integer userId);

    @Select("SELECT * FROM tb_user_freeze WHERE user_id=#{userId}")
    UserFreeze selectFreeze(Long userId);


}
